<!DOCTYPE html>
<html>
<head>
<#include "/layout/publicres.html"/>
</head>
<body>

        <form id="pwd-form" method="post">
	            <div region="center" border="false" style="padding: 10px; background: #fff; border: 1px solid #ccc;">
	                <table cellpadding=3>
	                    <tr>
	                        <td>当前密码：</td>
	                        <td><input name = "currpass" data-options="required:true,prompt:'请输入当前密码'" class="easyui-textbox" id="curNewPass" autocomplete="off" type="Password"  /></td>
	                    </tr>
	                    <tr>
	                        <td>新密码：</td>
	                        <td><input name = "newpass" data-options="required:true,prompt:'请输新密码'" class="easyui-textbox" id="txtNewPass" autocomplete="off" type="Password"  /></td>
	                    </tr>
	                    <tr>
	                        <td>确认密码：</td>
	                        <td><input data-options="required:true,prompt:'请确认新密码'"  validType="equalTo['#txtNewPass']" invalidMessage="两次输入密码不匹配" class="easyui-textbox" id="txtRePass" autocomplete="off" type="Password" /></td>
	                    </tr>
	                </table>
	            </div>
	            <div region="south" border="false" style="text-align: right; height: 30px; line-height: 30px;">
	                	<a id="btnEp" class="easyui-linkbutton" icon="icon-ok" href="javascript:void(0)" >确定</a> 
	            </div>
        </form>
    
   <script>
   $(function(){
		$("#btnEp").click(function(){
			$('#pwd-form').form('submit', {
				url:'user/changePWD',
				success:function(data){
					if(data == "1"){
						$.messager.alert('信息提示','当前密码输入错误！','info');
					}else if(data == "0"){
						$.messager.alert('信息提示','密码修改成功，请重新登录！','info');
						setTimeout("location.href='user/logout';", 200);  
					}else{
						$.messager.alert('信息提示','系统出错，请联系管理员！','info');
					}
				}
			});
		});
	});
   </script>
   </body>
   </html>